package org.test;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

public class OverloadedSub extends OverloadedSuper {

	@Override
	public int sum(int a, int b){
		return (a+b)/2;
	}

	@Override
	public String sum() {
		return null;
	}
	
	public static void main(String[] args) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
		List<Integer> numList = new ArrayList<Integer>();
		Method mes = numList.getClass().getMethod("add", Object.class);
		mes.invoke(numList, "aaa");
		System.out.println(numList.get(0));
		
	}

}
